<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:v="urn:schemas-microsoft-com:vml" xml:lang="en" lang="en">
	
<head>
<link rel="stylesheet" href="highlight/styles/default.css"/>
<script src="highlight/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

</head>
<body>
	<pre>

<code class="java" style="font-size:large;">

package com.groovy.learning

def t = 10
t='toto'
println t
String prenom = null

//java simple
if(nom!=null){
	System.out.println(  nom.toUpperCase());
}else{
	System.out.println(  nom);
}

if(prenom!=null){
	System.out.println( prenom.toUpperCase());
}else{
	System.out.println(  prenom);
}

//java autre syntaxe

System.out.println(nom!=null?nom.toUpperCase():nom)
System.out.println(prenom!=null?prenom.toUpperCase():prenom)


//groovy style

println nom?.toUpperCase();
println prenom?.toUpperCase();


</code>

</pre>

</body>
</html>
